<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ page import="com.infodms.dms.common.Constant"%>
<%@taglib uri="/jstl/cout" prefix="c" %>
<% String contextPath = request.getContextPath(); %>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<jsp:include page="${contextPath}/common/jsp_head_new.jsp" />
<head>
<title>库存查询</title>
<script type="text/javascript">
	function txtClr(valueId) {
		document.getElementById(valueId).value = '' ;
	}
</script>
</head>
<body> 
<div class="navigation"><img src="<%=contextPath%>/img/nav.gif" />&nbsp;当前位置：  整车销售 &gt; 库存管理 &gt; 经销商退车查询</div>
	<form id="fm" name="fm" method="post">
	<input type="hidden" name="reason" id="reason"/>
		<table class="table_query" border="0">
			<tr>
				<td width="20%" class="tblopt">
					<div align="right">
					<input type="radio" checked="checked" name="flag"  onclick="toChangeMaterial(1);" />
						物料组选择：
					</div>
				</td>
				<td>
					<input type="text" id="materialCode" name="materialCode" class="middle_txt" value=""  />
       				<input type="button" id="bt1" value="..." class="mini_btn"  onclick="showMaterialGroup('materialCode','','true','');" />
       				<input  id="mybtn1"  type="button" class="normal_btn" onclick="txtClr('materialCode');" value="清 空" id="clrBtn" />
				</td>
				<td></td>
			</tr>
			<tr>
				<td width="20%" class="tblopt">
					<div align="right">
					<input type="radio"  name="flag"  onclick="toChangeMaterial(2);"/>
						&nbsp;&nbsp;&nbsp;物料选择：
					</div>
				</td>
				<td>
					<input type="text" id="materialCode__" name="materialCode__" class="middle_txt" value=""  readonly="readonly"/>
       				<input type="button" id="bt2" value="..." class="mini_btn" disabled="disabled" onclick="showMaterial('materialCode__','','true','');" />
					<input id="mybtn2" type="button" class="normal_btn" onclick="txtClr('materialCode__');" value="清 空" id="clrBtn" />
				</td>
				<td></td>
			</tr>
			<tr>
				<td width="20%" class="tblopt">
					<div align="right">
						&nbsp;&nbsp;&nbsp;审核状态：
					</div>
				</td>
				<td>
					 <script type="text/javascript">
 				 		genSelBoxExp("status",<%=Constant.RETURN_STATUS%>,"",true,"short_sel","","false",'');
			  		 </script>
				</td>
				<td></td>
			</tr>
			<tr>
				<td width="20%" class="tblopt"><div align="right">VIN：</div></td>
				<td width="39%" >
      				<textarea id="vin" name="vin" cols="18" rows="3" ></textarea>
    			</td>
				<td class="table_query_3Col_input" >
					<input type="button" class="normal_btn" onclick="__extQuery__(1)" value="查 询" id="queryBtn" />&nbsp;
					<input type="button" class="normal_btn" onclick="getDownLoad();" value="下 载" id="queryBtn" /> 
				</td>
			</tr>
		</table>
		<!--分页 begin -->
		<jsp:include page="${contextPath}/queryPage/orderHidden.html" />
		<jsp:include page="${contextPath}/queryPage/pageDiv.html" />
    	<!--分页 end -->
	</form>
<script type="text/javascript">

	var myPage;
	
	var title = null;
	
	var	url = "<%=contextPath%>/sales/storageManage/ReturnVehicleReq/returnVehicleQuery.json";
	
	var	columns = [
				{header: "退车号", dataIndex: 'REQ_NO', align:'center'},
				{header: "车型名称", dataIndex: 'MODEL_NAME', align:'center'},
				{header: "配置", dataIndex: 'PACKAGE_NAME', align:'center'},
				{header: "物料代码", dataIndex: 'MATERIAL_CODE', align:'center'},
				{header: "物料名称", dataIndex: 'MATERIAL_NAME', align:'center'},
				{header: "VIN", dataIndex: 'VIN', align:'center'},
				{header: "经销商", dataIndex: 'DEALER_NAME', align:'center'},
				{header: "申请时间", dataIndex: 'RAISE_DATE', align:'center'},
				{header: "申请原因", dataIndex: 'REASON', align:'center'},
				{header: "审核时间", dataIndex: 'CHECK_DATE', align:'center'},
				{header: "审核结果", dataIndex: 'CHECK_REMARK', align:'center'},
				{header: "审核状态", dataIndex: 'REQ_STATUS', align:'center',renderer:getItemValue}
		      ];
	var mybtn1=document.getElementById("mybtn1");
	var mybtn2=document.getElementById("mybtn2");
	mybtn2.disabled=true;
	function toChangeMaterial(type)
	{
		var materialCode = document.getElementById("materialCode");//物料组
		var materialCode__ = document.getElementById("materialCode__");//物料
		var bt1 = document.getElementById("bt1");
		var bt2 = document.getElementById("bt2");
		
		//选择物料组
		if(type==1)
		{
			materialCode__.readOnly = true;
			materialCode__.value="";
			materialCode.readOnly = false;
			bt1.disabled  = false;
			bt2.disabled  = true;
			mybtn1.disabled=false;
			mybtn2.disabled=true;
		}
		else
		{
			materialCode.readOnly = true;
			materialCode.value="";
			materialCode__.readOnly=false;
			bt1.disabled  = true;
			bt2.disabled  = false;
			mybtn1.disabled=true;
			mybtn2.disabled=false;
		}
	}
	function getDownLoad(){
		fm.action = "<%=contextPath%>/sales/storageManage/ReturnVehicleReq/vhclBackDownLoad.json";
		fm.submit();
	}
</script>    
</body>
</html>